﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RecordBill.Dtos
{
    public class PageQuery : INotifyPropertyChanged
    {
        public int PageSize { get; set; }
        private int _pageSize;
        public int PageIndex
        {
            get => _pageSize; set
            {
                _pageSize = value;
                ProertyChange("PageIndex");
            }
        }
        private int _pageCount;
        public int PageCount
        {
            get => _pageCount; set
            {
                _pageCount = value;
                ProertyChange("PageCount");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected void ProertyChange(string p)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(p));
        }
    }
    public class PageQueryBill : PageQuery
    {
        private DateTime? _startTime;

        public DateTime? StartTime
        {
            get => _startTime; set
            {

                _startTime = value;
                ProertyChange("StartTime");
            }
        }

        private DateTime? _endTime;
        public DateTime? EndTime
        {
            get => _endTime; set
            {
                _endTime = value;
                ProertyChange("EndTime");
            }
        }
    }
}
